<?php

namespace App\Http\Requests\Admin;

use App\Http\Requests\ApiRequest;

/**
 * @property string name
 * @property string per_page
 */
class PartnerIndexRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'sometimes|string',
        ];
    }

    /**
     * @return array
     */
    public function messages()
    {
        return [
            'name.*' => ':attribute必须是字符串',
        ];
    }

    /**
     * @return array
     */
    public function attributes()
    {
        return [
            'name' => '合作伙伴名称'
        ];
    }
}
